Skip to content

Conversation

@bernardodemarco
Copy link
Member

Description

Currently, the listNetworkOfferings API supports the forvpc and guestiptype parameters (see API docs). The first is used to filter network offerings that can only be used for creating VPC tiers; the second allows filtering by guest network type (available options are: Isolated, Shared and L2).

This PR adds support to these parameters in the UI. The forvpc filter has been added as a normal filter (declared in the filters property of the network offerings section's object) and the guestiptype as a search filter (declared in the searchFilters property).

Furthermore, this PR also fixes a bug that caused duplicate options to appear in search filter lists.


Fixes #9924

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

image

image

How Has This Been Tested?

forvpc filter tests

  • I checked that when selecting VPC on the section's filter, a request to listNetworkOfferings was sent, with the forvpc parameter set to true.
  • I checked that when selecting Guest Network on the section's filter, a request to listNetworkOfferings was sent, with the forvpc parameter set to false.
  • I checked that when selecting All on the section's filter, a request to listNetworkOfferings was sent, without the forvpc parameter.

guestiptype filter tests

  • I checked that when selecting the Isolated option on the Guest Type search filter, a request to listNetworkOfferings was sent, with the guestiptype parameter set to Isolated.
  • I checked that when selecting the Shared option on the Guest Type search filter, a request to listNetworkOfferings was sent, with the guestiptype parameter set to Shared.
  • I checked that when selecting the L2 option on the Guest Type search filter, a request to listNetworkOfferings was sent, with the guestiptype parameter set to L2.

Duplicate options in search filter lists

Before

image

After

image

@bernardodemarco
Copy link
Member Author

@blueorangutan ui

@blueorangutan
Copy link

@bernardodemarco a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@codecov
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 15.80%. Comparing base (8a2c0f3) to head (75c6305).
⚠️ Report is 742 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9947      +/-   ##
============================================
- Coverage     15.80%   15.80%   -0.01%     
- Complexity    12585    12586       +1     
============================================
  Files          5627     5627              
  Lines        492343   492350       +7     
  Branches      59694    59694              
============================================
  Hits          77828    77828              
- Misses       405992   405999       +7     
  Partials       8523     8523              
Flag Coverage Δ
uitests 4.04% <ø> (-0.01%) ⬇️
unittests 16.63% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9947 (QA-JID-481)

@JoaoJandre
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

@JoaoJandre a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9947 (QA-JID-486)

@kiranchavala
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

@kiranchavala a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9947 (QA-JID-489)

Copy link
Contributor

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,

Tested manually and the filters are present are L2, Shared, Isolated and vpc network offerings

Screenshot 2024-11-29 at 11 21 48 AM
Screenshot 2024-11-29 at 11 22 25 AM

Screenshot 2024-11-29 at 11 21 40 AM

@DaanHoogland DaanHoogland added this to the 4.21.0 milestone Nov 29, 2024
Copy link
Contributor

@JoaoJandre JoaoJandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLGTM, I did not test it

@JoaoJandre JoaoJandre merged commit 546ef31 into apache:main Nov 29, 2024
24 of 25 checks passed
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Dec 12, 2024
…listNetworkOfferings` API (apache#9947)

* add guestiptype and forvpc filters for listNetworkOfferings on UI

* fix duplicate option names on list filters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Add a filter option to view the network offerings based on the network type , Isolated, VPC, Shared ,L2

6 participants